package com.zenghus.single;

//饿汉单例
//程序初始化就加载，如果不需要用到就会浪费资源
public class SingleClass {
    private static SingleClass sinleclass=new SingleClass();

    private SingleClass(){
    }

    public static SingleClass getInstance(){
        return sinleclass;
    }
}
